package com.alibaba.aone.casestudy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.aone.casestudy.common.entity.FailureRpAsignGroup;
import com.alibaba.aone.casestudy.dao.FailureRpAsignGroupDao;
import com.alibaba.aone.casestudy.service.GroupService;

/**
 * 类GroupServiceImpl.java的实现描述：TODO 类实现描述
 * 
 * @author yongchun.chengyc 2011-4-26 下午08:55:21
 */
public class GroupServiceImpl implements GroupService {

	@Autowired
	private FailureRpAsignGroupDao groupDao;

	/*public FailureRpAsignGroup getGroup(String failureNumber) {

		return groupDao.load(failureNumber);
	}
*/
	public void add(FailureRpAsignGroup group) {
		groupDao.insertGroup(group);

	}

	public void update(FailureRpAsignGroup group) {
		groupDao.update(group);

	}

	public List<FailureRpAsignGroup> getAll() {
		return groupDao.findAll();
	}

	public List<FailureRpAsignGroup> getGroups(String failureNumber) {
		
		return groupDao.findGroup(failureNumber);
	}

}
